package com.fastwire.carriere.rad.snmpadapter;

import org.snmp4j.mp.SnmpConstants;
import org.snmp4j.smi.OID;

/*
 * Creted on 20120501
 * Author: Lei Jun
 */
// for RAD IPMux 2L
public final class SnmpRadConstants {
    
    //snmpTrapOID;
    // snmp info
    public static final int    SNMP_Version    = SnmpConstants.version2c;  // 0 represents SNMP version=1
    public static final int    SNMP_Port       = 161;
    public static final int    SNMPTRAP_Port   = 162;
    public static final String SNMP_PROTOCOL   = "udp";
    public static final String COMMUNITY_Read  = "public";  // "public"; for test 
    public static final String COMMUNITY_Write = "private";
    public static final String COMMUNITY_Trap  = "SNMP_trap";
    
    // 1. rad info
    public static final OID OID_sysDescr    = new OID("1.3.6.1.2.1.1.1.0");
    public static final OID OID_sysObjectID = new OID("1.3.6.1.2.1.1.2.0");
    public static final OID OID_sysUpTime   = new OID("1.3.6.1.2.1.1.3.0");
    public static final OID OID_sysContact  = new OID("1.3.6.1.2.1.1.4.0");
    public static final OID OID_sysName     = new OID("1.3.6.1.2.1.1.5.0");
    public static final OID OID_sysLocation = new OID("1.3.6.1.2.1.1.6.0");   // not OID("1.3.6.1.2.1.1.6") !!!
    public static final OID OID_sysServices = new OID("1.3.6.1.2.1.1.7.0");
    
    public static final OID OID_openViewSeverity = new OID("1.3.6.1.4.1.11.2.17.2.5"); // removed the .0
    
    //public static final entPhysicalTable   1.3.6.1.2.1.47.1.1.1    OBJECT-TYPE
    // ifTable  1.3.6.1.2.1.2.2
    public static final OID OID_ifEntry  = new OID("1.3.6.1.2.1.2.2.1"); // OBJECT-TYPE
    public static final OID OID_ifIndex  = new OID("1.3.6.1.2.1.2.2.1.1");
    public static final OID OID_ifDescr  = new OID("1.3.6.1.2.1.2.2.1.2");
    public static final OID OID_ifType   = new OID("1.3.6.1.2.1.2.2.1.3");
    public static final OID OID_ifMtu         = new OID("1.3.6.1.2.1.2.2.1.4");
    public static final OID OID_ifSpeed       = new OID("1.3.6.1.2.1.2.2.1.5");
    public static final OID OID_ifPhysAddress = new OID("1.3.6.1.2.1.2.2.1.6");
    public static final OID OID_ifAdminStatus = new OID("1.3.6.1.2.1.2.2.1.7");
    public static final OID OID_ifOperStatus  = new OID("1.3.6.1.2.1.2.2.1.8");
    //public static final OID OID_ifLastChange  = new OID("1.3.6.1.2.1.2.2.1.9");

    
    //RAD
    public static final OID OID_rad = new OID("1.3.6.1.4.1.164");
    
    // gw validation
    public static final OID OID_systemDefaultGateway = new OID("1.3.6.1.4.1.164.6.2.24.0");
    public static final OID OID_atmNteHostIP         = new OID("1.3.6.1.4.1.164.12.3.1.1.11.1.2");
    public static final OID OID_atmNteHostMask       = new OID("1.3.6.1.4.1.164.12.3.1.1.11.1.3");
    
    /*
    public static final OID OID_dhcpClientAction         = new OID("1.3.6.1.4.1.164.11.7.2.2.1.6.1.1");
    public static final OID OID_dhcpClientServerIpAddress= new OID("1.3.6.1.4.1.164.11.7.2.2.1.6.1.2");
    public static final OID OID_dhcpClientStatus         = new OID("1.3.6.1.4.1.164.11.7.2.2.1.6.1.4");
    public static final OID OID_atmNteHostDefaultNextHop = new OID("1.3.6.1.4.1.164.12.3.1.1.11.1.10");
    */

    /*
    // 2. loop back 
    // 1.3.6.1.4.1.164.6.2.15.4.0
    public static final OID OID_prtTestTable        = new OID("1.3.6.1.4.1.164.6.2.15.4.1");
    public static final OID OID_prtTestIdx          = new OID("1.3.6.1.4.1.164.6.2.15.4.1.1.1");    
    public static final OID OID_prtTestCmdAndStatus = new OID("1.3.6.1.4.1.164.6.2.15.4.1.1.2");
    
    /*  prtTestCmdAndStatus bit  NOTE 
        0  No test 
        2  Line Loop Test 
        4  Inward Loop Test  * /
    public static final int LB_Notest     = 0;
    public static final int LB_LineLoop   = 4;
    public static final int LB_InwardLoop = 16;

    45: v35 HS
    19: E1
     */
    public static final int HS_TPTYPE = 45;
    public static final int E1_TPTYPE = 19;
    public static final String LB_EXTERNAL = "external";
    public static final String LB_INTERNAL = "internal";
    
    // HSloopback(index:21):  4(external), 2(internal), 0(disable loopback)
    public static final OID OID_prtGenTestCmd = new OID("1.3.6.1.4.1.164.3.3.3.1.1.1.9.21");

    // E1 loopback(index:1-2):  3(external), 5(internal), 1(disable loopback)
    public static final OID OID_dsx1LoopbackConfig = new OID("1.3.6.1.2.1.10.18.6.1.9.1");  // .9.2  ??
    
    // 3. trap messages:
    public static final OID OID_trapOID    = new OID("1.3.6.1.6.3.1.1.4.1.0");
    public static final OID OID_coldStart  = new OID("1.3.6.1.6.3.1.1.5.1");
    public static final OID OID_warmStart  = new OID("1.3.6.1.6.3.1.1.5.2");
    public static final OID OID_alarm      = new OID("1.3.6.1.4.1.164.3.3.0.2");  // dacsMuxAlarmsTrap
    //public static final OID OID_log        = new OID(); // 1.3.6.1.4.1.164.12.3.0


    //X alarmsTrap            1.3.6.1.4.1.164.3.2.0.1   This trap is sent whenever alarm occurs in the agent.
    // dacsMuxAlarmsTrap,     1.3.6.1.4.1.164.3.3.0.2   //"This trap is sent when an alarm occurs."

    // linkDown,              1.3.6.1.6.3.1.1.5.3
    // linkup,                1.3.6.1.6.3.1.1.5.4

    
    // alarms:  ---------- 
    //fault
    //                            alrGenTable                1.3.6.1.4.1.164.3.3.4.3
    //public static final OID OID_alrGenEntry     = new OID("1.3.6.1.4.1.164.3.3.4.3.1");  //An entry in table
    public static final OID OID_alrGenCode        = new OID("1.3.6.1.4.1.164.3.3.4.3.1.1");
    public static final OID OID_alrGenDescription = new OID("1.3.6.1.4.1.164.3.3.4.3.1.2");  //Description
    //                        1.3.6.1.4.1.164.3.3.4.3.1.2.3 : CLOCK WAS CHANGED TO INTERNAL
    public static final OID OID_alrGenLevel		  = new OID("1.3.6.1.4.1.164.3.3.4.3.1.3");
    public static final OID OID_alrGenSlotType	  = new OID("1.3.6.1.4.1.164.3.3.4.3.1.4");
    public static final OID OID_alrGenSeverity    = new OID("1.3.6.1.4.1.164.3.3.4.3.1.5");  //Severity
    // alrGenDebounce
    // alrGenDefSeverity

    // sysCurrentAlr
    public static final OID OID_sysSAlrTable     = new OID("1.3.6.1.4.1.164.3.3.1.4.1");      // not-accessible
    // public static final OID OID_sysSAlrEntry   = new OID("1.3.6.1.4.1.164.3.3.1.4.1.1");  // not-accessible
    public static final OID OID_sysSAlrIdx       = new OID("1.3.6.1.4.1.164.3.3.1.4.1.1.1"); // port
    public static final OID OID_sysSAlrCode      = new OID("1.3.6.1.4.1.164.3.3.1.4.1.1.2"); //AlarmCode
    public static final OID OID_sysSAlrState     = new OID("1.3.6.1.4.1.164.3.3.1.4.1.1.3"); //State
  	// sysSAlarmMask	1.3.6.1.4.1.164.3.3.1.4.1.1.4
  	// sysSAlarmInvert	1.3.6.1.4.1.164.3.3.1.4.1.1.5
    public static final OID OID_sysSAlarmOnOff   = new OID("1.3.6.1.4.1.164.3.3.1.4.1.1.6");
    // sysSAlarmCounter             1.3.6.1.4.1.164.3.3.1.4.1.1.7
    // sysSAlrClearCmd              1.3.6.1.4.1.164.3.3.1.4.2
    // sysSAlrClearAllCmd           1.3.6.1.4.1.164.3.3.1.4.3.0    
    
    
    // sysBufferAlr 
    /*
    sysBufferAlr       1.3.6.1.4.1.164.3.3.1.5        
    sysBufferAlrTable  1.3.6.1.4.1.164.3.3.1.5.1    // List of current existing alarms (of all levels)
    sysBufferAlrEntry  1.3.6.1.4.1.164.3.3.1.5.1.1
    sysBufferAlrIdx    1.3.6.1.4.1.164.3.3.1.5.1.1.1
    */    
    public static final OID OID_sysBufferAlrCode  = new OID("1.3.6.1.4.1.164.3.3.1.5.1.1.2");
    public static final OID OID_sysBufferAlrState = new OID("1.3.6.1.4.1.164.3.3.1.5.1.1.3");
    public static final OID OID_sysBufferAlrSlot  = new OID("1.3.6.1.4.1.164.3.3.1.5.1.1.4");
    public static final OID OID_sysBufferAlrPort  = new OID("1.3.6.1.4.1.164.3.3.1.5.1.1.5");
    public static final OID OID_sysBufferAlrDate  = new OID("1.3.6.1.4.1.164.3.3.1.5.1.1.6");
    public static final OID OID_sysBufferAlrTime  = new OID("1.3.6.1.4.1.164.3.3.1.5.1.1.7");
    /*
    sysBufferAlrUpTime 1.3.6.1.4.1.164.3.3.1.5.1.1.8
    sysBufferAlrClearCmd   1.3.6.1.4.1.164.3.3.1.5.2
    */

    //PrtSAlrState  1.3.6.1.4.1.164.3.1.4.1.2.1.7       // read-only
    
    
    /*
    // atmGenSysSelfTestTable       1.3.6.1.4.1.164.12.2.2.1.1
       atmGenSysSelfTestEntry       1.3.6.1.4.1.164.12.2.2.1.1.1
       atmGenSysSelfTestIndex       1.3.6.1.4.1.164.12.2.2.1.1.1.1 RAD-MIB
       atmGenSysSelfTestResult      1.3.6.1.4.1.164.12.2.2.1.1.1.2 RAD-MIB
    */
    
    // log --------------
    //public static final OID OID_atmGenSysLogTable    = new OID("1.3.6.1.4.1.164.12.2.2.1.3");  // not-accessible
    public static final OID OID_atmGenSysLogEntry    = new OID("1.3.6.1.4.1.164.12.2.2.1.3.1");
    public static final OID OID_atmGenSysLogIndex    = new OID("1.3.6.1.4.1.164.12.2.2.1.3.1.1");
    public static final OID OID_atmGenSysLogMessage  = new OID("1.3.6.1.4.1.164.12.2.2.1.3.1.2");  // date, time event
    public static final OID OID_atmGenSysLogClearAll = new OID("1.3.6.1.4.1.164.12.2.2.1.2.0");

    
    /* reference:
http://www.mibdepot.com/cgi-bin/getmib4.cgi?abc=0&n=RAD-MIB&r=rad&f=rad-mib.mib&t=tree&v=v2&i=0&obj=RAD-MIB */

}

    